<?php

namespace Kateba\SiteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * UserService
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Kateba\SiteBundle\Entity\UserServiceRepository")
 */
class UserService {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $payerEmail
     * @Assert\Email
     * @ORM\Column(name="payerEmail", type="string", length=255,nullable=true)
     */
    private $payerEmail;

    /**
     * @var string $transactionId
     * @ORM\Column(name="transactionId", type="string", length=255,nullable=true)
     */
    private $transactionId;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="createdAt", type="datetime")
     */
    private $createdAt;

    /**
     * @var boolean
     *
     * @ORM\Column(name="active", type="boolean")
     */
    private $active = true;

    /**
     * @var boolean
     *
     * @ORM\Column(name="isPaypal", type="boolean")
     */
    private $isPaypal = true;
    
    /**
     * @var boolean
     *
     * @ORM\Column(name="isRush", type="boolean")
     */
    private $isRush = false;
    
    /**
     * @var \Kateba\SiteBundle\Entity\Service
     *
     * @ORM\ManyToOne(targetEntity="\Kateba\SiteBundle\Entity\Service", inversedBy="userServices")
     * @ORM\JoinColumn(name="service_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
     */
    private $service;

    /**
     * @var \Kateba\UserBundle\Entity\User
     *
     * @ORM\ManyToOne(targetEntity="\Kateba\UserBundle\Entity\User", inversedBy="userServices")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
     */
    private $user;

    public function __construct() {
        $this->createdAt = new \DateTime();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return UserService
     */
    public function setCreatedAt($createdAt) {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt() {
        return $this->createdAt;
    }

    /**
     * Set active
     *
     * @param boolean $active
     * @return UserService
     */
    public function setActive($active) {
        $this->active = $active;

        return $this;
    }

    /**
     * Get active
     *
     * @return boolean
     */
    public function getActive() {
        return $this->active;
    }

    /**
     * Set service
     *
     * @param \Kateba\SiteBundle\Entity\Service $service
     * @return UserService
     */
    public function setService(\Kateba\SiteBundle\Entity\Service $service) {
        $this->service = $service;

        return $this;
    }

    /**
     * Get service
     *
     * @return \Kateba\SiteBundle\Entity\Service
     */
    public function getService() {
        return $this->service;
    }

    /**
     * Set user
     *
     * @param \Kateba\UserBundle\Entity\User $user
     * @return UserService
     */
    public function setUser(\Kateba\UserBundle\Entity\User $user) {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \Kateba\UserBundle\Entity\User
     */
    public function getUser() {
        return $this->user;
    }

    /**
     * Set payerEmail
     *
     * @param string $payerEmail
     * @return UserService
     */
    public function setPayerEmail($payerEmail) {
        $this->payerEmail = $payerEmail;

        return $this;
    }

    /**
     * Get payerEmail
     *
     * @return string
     */
    public function getPayerEmail() {
        return $this->payerEmail;
    }

    /**
     * Set transactionId
     *
     * @param string $transactionId
     * @return UserService
     */
    public function setTransactionId($transactionId) {
        $this->transactionId = $transactionId;

        return $this;
    }

    /**
     * Get transactionId
     *
     * @return string
     */
    public function getTransactionId() {
        return $this->transactionId;
    }


    /**
     * Set isPaypal
     *
     * @param boolean $isPaypal
     * @return UserService
     */
    public function setIsPaypal($isPaypal)
    {
        $this->isPaypal = $isPaypal;
    
        return $this;
    }

    /**
     * Get isPaypal
     *
     * @return boolean 
     */
    public function getIsPaypal()
    {
        return $this->isPaypal;
    }

    /**
     * Set isRush
     *
     * @param boolean $isRush
     * @return UserService
     */
    public function setIsRush($isRush)
    {
        $this->isRush = $isRush;
    
        return $this;
    }

    /**
     * Get isRush
     *
     * @return boolean 
     */
    public function getIsRush()
    {
        return $this->isRush;
    }
}